text = "To be or not to be,that is the question."

# 创建一个空集合和空字典
letters_set = set()
letter_count = {}

# 遍历文本中的每个字符
for char in text:
    # 判断字符是否为字母
    if char.isalpha():
        # 将字母添加到集合中
        letters_set.add(char.lower())

        # 检查字母是否意见在字典中，如果在，则增加计数；否则，将字母添加到字典并初始化计数
        if char.lower() in letter_count:
            letter_count[char.lower()] += 1
        else:
            letter_count[char.lower()] = 1

# 打印每个字及出现次数
for letter in letters_set:
    count = letter_count[letter]
    print(f"{letter}:{count}")